Previous Book Contents Book Index Next

Inside Macintosh: Mac OS 8 Toolbox Reference /
Chapter 2 - Control Manager Reference / Control Manager Functions
Embedding Controls /


EmbedControl

NEW WITH THE APPEARANCE MANAGER

Embeds one control inside another.

pascal OSErr EmbedControl (
                     ControlHandle inControl,
                     ControlHandle inContainer);
inControl
On input, a handle to a control to be embedded.
inContainer
On input, a handle to the embedder control.
function result
A result code; see "Result Codes". The result code errNoRootControl indicates that there is no root control in the specified window. The result code errControlIsNotEmbedder indicates that the specified control does not support embedding. The result code errCantEmbedIntoSelf indicates that the controls specified in the inControl and inContainer parameters are the same control. The result code errCantEmbedRoot indicates that you are trying to embed the root control.
DISCUSSION
An embedding hierarchy must be established before your application calls the EmbedControl function. If the specified control does not support embedding or there is no root control in the owning window, an error is returned. If the control you wish to embed is in a different window from the embedder control, an error is returned. See "Embedding Controls" for more details on embedding.

SEE ALSO
"Appearance Manager Gestalt Selector Constants".

AutoEmbedControl.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
8 JAN 1998